Client-server architecture has been used for a long time in network communications. It is for example implemented in HTTP (standing for “Hypertext Transfer Protocol”), a well-known protocol for sending web pages over the Internet.
In HTTP, a client device first initiates a network connection (generally a TCP/IP connection) with a server device and then sends a request to the server device to obtain for example an HTML (standing for “Hypertext Markup Language”) web page.
In the same network connection, the server device replies to the client request with a response consisting for example of the requested HTML web page. Once the response has been received, the network connection is generally closed.
This describes the “Pull” model of communication where the client device initiates the content delivery, namely requests (i.e. pulls) the digital resource from the server device, and the server device sends the requested resource to the client device in response to the request.
A “Push” model of communication has also been developed as an alternative mechanism, where the content delivery is initiated by the server device hosting the digital resource (i.e. holding the digital resource in an internal storage memory). The client device receives the digital resource without any prior request from it.
This “push” model is currently widely used in Internet-based communications, for example for instant publication of data (stock quotes, news, weather forecast . . . ) and for improved (in terms of time) web page loading. Below reference will be mainly made to web page loading as an illustrative example of the invention, although the invention can concern a variety of other applications.
A generic solution for pushing digital resources to a client device consists in keeping open a network connection established by the client device with a server device. Thanks to the kept-open connection, the server device is thus able to send resources to the client device whenever required.
This is for example used for instant publication of data based on Server-Sent Events. Such events, currently standardized by the World Wide Web Consortium (W3C), make it possible for the server device to push a stream of events and messages to a client device over the existing connection.
Web page loading has also led to notable developments of HTTP. In particular, SPDY (standing for “SPeeDY”) has improved HTTP in several ways that offer data push.
In particular, the SPDY draft specification provides “Push transaction” capability for the server device to allow multiple responses to be sent in response to a single client request.
This capability proves to be useful when a client device requests a digital resource such as a web page from a web server device, wherein the digital resource comprises components defined by other secondary resources (for instance, a CSS style sheet, a JavaScript file and various images) and which components are generally needed to exploit or display the main digital resource. This is because, in that case, the server device providing the requested resource may infer that the client device will need the secondary resources. It can then anticipate any client request for those secondary resources by deciding to send the secondary resources it hosts to the client device over the existing network connection before they are requested.
FIG. 1 illustrates the “Push transaction” capability of SPDY.
A client device C first requests a main resource of web page type and which is referenced index.html, from a main web server device S whose Internet location is example.org. In the example, the web page index.html includes references to components that are required in order to display the whole web page: a style sheet resource referenced style.css also hosted by the main server device S and two picture resources image0.jpg and image1.jpg hosted by another web server, namely the secondary server device whose Internet location is example.com.
Since resource style.css is available at the main server device S, the latter can push that resource to the client device C over the existing network connection.
However, the main server device S is unable to push the two image resources to the client device C since it does not hold them.
Based on conventional processing, the client device C then parses the received web page type index.html to discover that the two image resources image0.jpg and image1.jpg referenced in the main web page are needed for display. The client device C then requests them from the secondary web server device example.com and receives the two resources in response.
It is easy to understand that the “Push transaction” capability is likely to speed up the processing and display of the main resource index.html, in particular if all the secondary resources associated with it or referenced therein are hosted by the main server device S. This is because, thanks to the push, all the secondary resources required by the main resource become available at the client device C when it parses that main resource.
A difficulty arises for the secondary resources that are missing at the main server device S (i.e. not hosted by that server device), such as the above two picture resources image0.jpg and image1.jpg. In particular, they cut off most of the benefits provided by the “Push transaction” capability since by requesting the missing two picture resources, the client device C slows down the potentially optimized processing and display of the main resource.
One goal of the invention is to improve this situation, in particular to transmit the missing secondary resources, i.e. those resources that are missing at the main server device S but hosted by a secondary server device, in a more efficient way.
Prior art provides solutions that are not fully satisfactory.
For example, publication US-2002/0065800 discloses a method for providing resources from a web server to a client computer to enable offline browsing of web sites. In the disclosed method, the web server requested for a web page first gathers all the secondary resources referenced therein, including the secondary resources hosted by remote secondary servers. It then creates a single HTTP archive resource comprising the gathered secondary resources and transmits the single file to the requesting client computer.
A first drawback of this approach is that centralizing the secondary resources in the web server damages the benefits of a distributed web system.
Another drawback regards unnecessary consumption of storage memory. This is because this approach requires duplicating the missing secondary resources in the main web server.
The processing time required to create the archive file is yet another drawback, since it is clearly contrary to the very purpose of the Push model, namely to provide a dynamic, fast and responsive web service.
The present invention has been devised to address at least one of the foregoing concerns, in particular to improve the providing of main and associated secondary resources to a requesting client device, using the Push mechanism.